package com.service;

import com.dao.bookDao;

import java.sql.ResultSet;
import java.sql.SQLException;

public class bookService {
    private bookDao bookDao=new bookDao();


    public ResultSet queryAll() throws SQLException, ClassNotFoundException {
        return bookDao.queryAll();
    }

    public ResultSet queryOne(String bookid) throws SQLException, ClassNotFoundException {
        return bookDao.queryOne(bookid);
    }

    public String getBookName(String bookid) throws SQLException, ClassNotFoundException {
        ResultSet resultSet = bookDao.queryOne(bookid);
        while (resultSet.next()){
            return resultSet.getString(2);
        }
        return "";
    }




}
